<!--
 * @Author: leechoy 1419352779@qq.com
 * @Date: 2024-04-14 14:12:09
 * @LastEditors: leechoy 1419352779@qq.com
 * @LastEditTime: 2024-07-15 11:23:53
 * @FilePath: /H5_SCAN/Front/H5_SCAN/src/App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <a-config-provider :locale="locale">
    <router-view />
    <global-setting />
  </a-config-provider>
</template>

<script lang="ts" setup>
  import { computed } from 'vue';
  import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
  import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
  import GlobalSetting from '@/components/global-setting/index.vue';
  import useLocale from '@/hooks/locale';

  const { currentLocale } = useLocale();
  const locale = computed(() => {
    switch (currentLocale.value) {
      case 'zh-CN':
        return zhCN;
      case 'en-US' :
        return enUS;
      default:
        return enUS;
    }
  });
</script>
